package com.hcs.chenyu.moreaboutstudent;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.hcs.chenyu.R;
import com.hcs.chenyu.updatestudent;

public class more extends AppCompatActivity implements View.OnClickListener {
    private Button mbtn_addstu,mbtn_update,mbtn_deletestu,mbtn_find;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_more);
        inview();
    }

    private void inview() {
        mbtn_addstu = findViewById(R.id.btn_addstu);
        mbtn_deletestu = findViewById(R.id.btn_deletestu);
        mbtn_update = findViewById(R.id.btn_updates);
        mbtn_find = findViewById(R.id.btn_find);
        mbtn_addstu.setOnClickListener(this);
        mbtn_deletestu.setOnClickListener(this);
        mbtn_update.setOnClickListener(this);
        mbtn_find.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_addstu:
                Intent intent =new Intent(more.this, addstudent.class);
                startActivity(intent);
                break;
            case R.id.btn_updates:
                Intent intent1 =new Intent(more.this, updatestudent.class);
                startActivity(intent1);
                break;
            case R.id.btn_deletestu:
                Intent intent2 =new Intent(more.this, deletestudent.class);
                startActivity(intent2);
                break;
                case R.id.btn_find:
                Intent intent3 =new Intent(more.this, findallstudentinformation.class);
                startActivity(intent3);
                break;
        }
    }
}